Conversation
- CMake toolchain files for arm-linux-gnueabihf, aarch64-linux-gnu, loongarch64-linux-gnu - GitHub Actions workflow build-native.yml: builds LVGL shared lib on 7 RIDs - GitHub Actions workflow nuget-publish.yml: packs and publishes to NuGet.org and GitHub Packages - New LVGLSharp.Native project: native-only NuGet package with runtimes layout - Directory.Build.props: shared NuGet metadata for all projects - LVGLSharp.Interop.csproj: added PackageId/description and CI-conditional LVGLSharp.Native dependency - LVGLSharp.Forms.csproj: added PackageId/description and linux-loongarch64 RID Co-authored-by: maikebing <3445167+maikebing@users.noreply.github.com>
|
…onfigure Co-authored-by: maikebing <3445167+maikebing@users.noreply.github.com>
Fixed in 61b9c38. LVGL's CMake searches for |
There was a problem hiding this comment.
Pull request overview
This PR adds CI/CD infrastructure for building LVGL native shared libraries across multiple platforms and packaging them as NuGet packages. It introduces a reusable GitHub Actions workflow for cross-platform native builds, a NuGet publish pipeline, a new LVGLSharp.Native project for distributing platform-specific binaries, and shared build metadata.
Changes:
- New
build-native.ymlworkflow builds LVGL as a shared library for 7 RIDs (win-x64/x86/arm64, linux-x64/arm/arm64/loongarch64) with corresponding CMake cross-compilation toolchain files. - New
nuget-publish.ymlworkflow assembles native artifacts and packs/publishesLVGLSharp.Native,LVGLSharp.Interop, andLVGLSharp.Formsto NuGet.org and GitHub Packages. - New
LVGLSharp.Nativeproject,Directory.Build.propsfor shared metadata, and updated.csprojfiles for Interop (CI-gated native dependency) and Forms (addedlinux-loongarch64RID).
Reviewed changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
.github/workflows/build-native.yml |
Reusable workflow for multi-platform LVGL native library builds |
.github/workflows/nuget-publish.yml |
NuGet packaging and publishing pipeline |
src/LVGLSharp.Native/LVGLSharp.Native.csproj |
New native-only NuGet package project |
src/LVGLSharp.Interop/LVGLSharp.Interop.csproj |
Added PackageId and CI-gated LVGLSharp.Native dependency |
src/LVGLSharp.WinForms/LVGLSharp.Forms.csproj |
Added PackageId and loongarch64 RID to Linux condition |
Directory.Build.props |
Shared NuGet metadata (authors, license, version) |
libs/cmake/toolchains/*.cmake |
Cross-compilation toolchain files for ARM, ARM64, and LoongArch64 |
.github/workflows/nuget-publish.yml
Outdated
| - name: Pack LVGLSharp.Interop | ||
| run: | | ||
| dotnet pack src/LVGLSharp.Interop/LVGLSharp.Interop.csproj \ | ||
| -c Release \ | ||
| -p:Version=${{ steps.ver.outputs.version }} \ | ||
| --output nupkgs |
.github/workflows/nuget-publish.yml
Outdated
| # Derive version: prefer workflow_dispatch input, then release tag, then branch name. | ||
| # Strip any leading 'v' so we always get a semver string. |
|
@copilot 有的成功了, 但大部分失败了, 你看下 https://github.com/IoTSharp/LVGLSharp.Forms/actions/runs/23113380409?pr=4 |
Co-authored-by: maikebing <3445167+maikebing@users.noreply.github.com>
Fixed in f5a716a. Three separate root causes, all addressed:
|
|
@copilot 去掉龙芯的编译, 然后参考 https://github.com/lvgl/lvgl/blob/master/.github/workflows/ccpp.yml 里面编译lvgl的参数 以及 编辑环境一来, 再一次做整理, 全程用中文, 这样方便我监督你。 |
Co-authored-by: maikebing <3445167+maikebing@users.noreply.github.com>
已在提交 9067315 中完成整理,具体改动如下: 移除龙芯编译支持:
参考 LVGL 官方 CI(ccpp.yml)整理构建环境:
同步修复其他问题:
|
|
@copilot 再开一个PR, 修正下面的问题 Package source with Name: github added successfully. |
LVGL supports a broad set of platforms but there was no CI pipeline to build the native shared library for each, nor any NuGet packaging for distribution.
CI: Native build matrix (
build-native.yml)Builds
lvglas a shared library (BUILD_SHARED_LIBS=ON) across 6 runtime identifiers using a matrix strategy, aligned with the LVGL official CI (ccpp.yml):win-x64/win-x86/win-arm64windows-latest-Aflaglinux-x64ubuntu-24.04linux-arm/linux-arm64ubuntu-24.04Per-RID artifacts (
native-{rid}) are uploaded for consumption by the packaging job.Linux builds use
ubuntu-24.04(matching the LVGL official CI), installcmakeandninja-buildas base dependencies, and use-G Ninjafor the CMake configure step.CMake cross-compilation toolchain files
libs/cmake/toolchains/arm-linux-gnueabihf.cmakelibs/cmake/toolchains/aarch64-linux-gnu.cmakeBuild fixes
lv_conf.his copied intolibs/lvgl/before CMake configure so LVGL's own CMake can find it.LV_USE_LINUX_FBDEVandLV_USE_EVDEVinlv_conf.hare now guarded with#if defined(__linux__)to prevent Windows builds from trying to compile Linux-only drivers that include<unistd.h>.$GITHUB_WORKSPACE(shell variable, resolved at step run-time) instead of${{ github.workspace }}(which expands to an empty string inside matrixincludevalues).NuGet packaging & publishing (
nuget-publish.yml)Triggered on GitHub release publication or
workflow_dispatch. Pipeline:build-native.ymlas a reusable workflowruntimes/{rid}/native/layoutnupkgs/directory as a NuGet source before packingLVGLSharp.Interop, so the CI-activatedLVGLSharp.Nativepackage reference resolves correctlyLVGLSharp.Native,LVGLSharp.Interop, andLVGLSharp.FormsNUGET_API_KEYsecret) and GitHub Packages (GITHUB_TOKEN)New project:
LVGLSharp.NativeA native-only NuGet package (
netstandard2.0,IncludeBuildOutput=false) that bundles the platform shared libraries in the standard runtime graph layout:Shared metadata:
Directory.Build.propsCentralises
Authors,PackageLicenseExpression,RepositoryUrl, and defaultVersion(9.3.0) for all projects.Updated projects
LVGLSharp.Interop—PackageId+LVGLSharp.Nativedependency (CI-gated via'$(CI)' == 'true'to avoid breaking local builds before the package is first published)LVGLSharp.Forms—PackageId+ Linux RID condition coverslinux-x64,linux-arm, andlinux-arm64🔒 GitHub Advanced Security automatically protects Copilot coding agent pull requests. You can protect all pull requests by enabling Advanced Security for your repositories. Learn more about Advanced Security.